//
//  CMDBNoteManagerDelegate.swift
//  CMDB
//
//  Created by 王磊 on 17/4/6.
//  Copyright © 2017年 CMDB. All rights reserved.
//

import UIKit

protocol CMDBNoteManagerDelegate: NSObjectProtocol {
    
    // 获取网络notelist
    func queryNoteList(noteListParam: CMDBQueryNoteListParam,tableView: UITableView,handler: CMDBNoteListHandler,error: CMDBHttpErrorHandler,failure: CMDBHttpFailureHandler) throws
    // 获取网络notelist
    func commitNote(commitNoteParam: CMDBCommitNoteParam,handler: CMDBCommitNoteHandler,error: CMDBHttpErrorHandler,failure: CMDBHttpFailureHandler) throws
    
    // 存取缓存日记列表  这个id 有待商榷
    func saveNoteList(noteList: Array<CMDBNoteBean>,identifier: String)
    //
    func queryNoteListCache(identifier: String) throws -> Array<CMDBNoteBean>
    
    func queryNoteDetail(noteDetailParam: CMDBNoteDetailParam,handler: CMDBCommitNoteHandler,error: CMDBHttpErrorHandler,failure: CMDBHttpFailureHandler)
    
    // 存取 删除 单挑日记
    func saveSingleNote(noteBean: CMDBNoteBean,identifier: String)
    
    func querySingleNoteCache(identifier: String) throws -> CMDBNoteBean
    
    func deleteSingleNoteCache(identifier: String)
    
    
}
